package com.wgts.wgts;

import android.app.Activity;

import com.wgts.wgts.base.BaseActivity;

import java.util.ArrayList;

public class ActivityStack {
    public ArrayList<BaseActivity> activities;

    private ActivityStack() {
        activities = new ArrayList<>();
    }


    private static ActivityStack _instance = null;

    public static ActivityStack getInstance(){
        if(_instance == null){
            _instance = new ActivityStack();
        }
        return _instance;
    }

    public void addActivity(BaseActivity activity){
        activities.add(activity);
    }

    public void removeActivity(BaseActivity activity){
        activities.remove(activity);
    }

    public ArrayList<BaseActivity> getActivities() {
        return activities;
    }
}
